package com.guomao.demob;

import java.lang.reflect.Modifier;

public class JavaDemo6 {

    public static void main(String[] args) throws Exception {


        Class<?> clazz = Class.forName("java.util.ArrayList");

        String name = clazz.getName();
        System.out.println(name);

        int i = clazz.getModifiers();

//        System.out.println(i);

        System.out.println(Modifier.isAbstract(i));//false
        System.out.println(Modifier.isPublic(i));//true
        System.out.println(Modifier.isPrivate(i));//false

        Class<?> superclass = clazz.getSuperclass();
        System.out.println(superclass);
        //class java.util.AbstractList

        Class<?>[] inter = clazz.getInterfaces();

        for (Class<?> c : inter) {
            System.out.println(c);
        }
    }

}
